package com.ews.onlineexchange.exception;

import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerFactory;

public class CustomExceptionHandlerFactory extends ExceptionHandlerFactory {

	private ExceptionHandlerFactory parent;

    public CustomExceptionHandlerFactory(
            ExceptionHandlerFactory parent) {
        this.parent = parent;
    }
	
	@Override
	public ExceptionHandler getExceptionHandler() {
		 ExceptionHandler result = parent.getExceptionHandler();  
	        result = new CustomExcepetionHandler(result);
	        return result;  
	}

}
